import 'package:flutter_screenutil/screenutil.dart';
import 'package:flutter/material.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/NavigationBar.dart';
import 'package:heyangkuaidai/FrameWorkModule/Utils/SPUtils.dart';
import 'package:heyangkuaidai/DemonStrateModule/FirstPage.dart';
class LoanEnterModalPage extends StatefulWidget {
  @override
  _LoanEnterModalPageState createState() => _LoanEnterModalPageState();
}

class _LoanEnterModalPageState extends State<LoanEnterModalPage> {
  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 375, height: 667, allowFontScaling: true);
    return Scaffold(
      resizeToAvoidBottomInset: false,
       body: Column(
         children: [
           SizedBox(height: MediaQuery.of(context).padding.top,),
           NavigationBar(false,title: "福祥e贷",),
           SizedBox(
             height: ScreenUtil().setWidth(30),
           ),
           Container(
             width: ScreenUtil().setWidth(120),
             height: ScreenUtil().setWidth(85),
             child: Image.asset("sources/yy/checking.png"),
           ),
           SizedBox(
             height: ScreenUtil().setWidth(26),
           ),
           Container(
             width: ScreenUtil().setWidth(160),
             child:Text("努力审核中……",style: TextStyle(fontSize: ScreenUtil().setSp(20),),textAlign: TextAlign.center,),
           ),
           SizedBox(
             height: ScreenUtil().setWidth(54),
           ),
           Container(
             width: ScreenUtil().setWidth(309),
             height: ScreenUtil().setWidth(72),
             child:Text("恭喜您！您本次的借款申请已成功提交，系统正在审核中，审核结果将以短信的方式发送给您。感谢您的支持与配合。",style: TextStyle(fontSize: ScreenUtil().setSp(15),color: Color(0xff999999)),textAlign: TextAlign.left,),
           ),
           SizedBox(
             height: ScreenUtil().setWidth(40),
           ),
           InkWell(
             onTap: (){
               SPUtils.save("status", "Yes");
               Navigator.of(context).pushAndRemoveUntil(
                 //跳转
                   new MaterialPageRoute(builder: (context) => new FirstPage()),
                   //清除其他路由
                       (route) => route == null
               );
             },
             child: Container(
                 decoration: BoxDecoration(
                   borderRadius: BorderRadius.circular(4),
                   color:Color(0xff41A5EE),
                 ),
                 width: ScreenUtil().setWidth(347),
                 height: ScreenUtil().setWidth(44),
                 child:Center(
                   child: Text("退出",style: TextStyle(fontSize: ScreenUtil().setSp(17),color: Colors.white),textAlign: TextAlign.center,),
                 )
             ) ,
           ),
         ],
       ),
    );
  }
}
